﻿$(document).ready(function () {
    $("#comment-area").focus();
});

function onCommentBegin() {
    $("#submit-button").attr("disabled", true);
}

function onCommentSuccess() {
    $("#submit-button").removeAttr("disabled", true);
    $("#comment-area").val("");
}

function onCommentFailure() {
    $("#submit-button").removeAttr("disabled", true);
    alert("Comment failed!");
}